if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set(CMAKE_INSTALL_PREFIX /usr)
endif ()

if (APPLE)
    add_definitions(-DDARWIN)
else ()
    add_definitions(-DLINUX)
endif ()

set(SOURCE_FILES
        ../../src/fp_buf.hpp
        ../../src/fp_buf.cpp
        ../../src/media_probe.hpp
        ../../src/media_probe.cpp
        block.cpp
        block.hpp
        dimension.cpp
        dimension.hpp
        file.cpp
        file.hpp
        layout.cpp
        layout.hpp
        layout_grid.cpp
        layout_grid.hpp
        tools.hpp
        track.cpp
        track.hpp
        option.cpp
        option.hpp
        )

add_executable(merge ${SOURCE_FILES} main_merge.cpp)
target_include_directories(merge PRIVATE third_party/json11/)

install(TARGETS merge DESTINATION bin/)